package com.mdjukebox.model.adminfacade.actions;

import java.sql.Connection;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.mdjukebox.model.jukeboxfacade.dao.DJDAO;
import com.util.exceptions.InternalErrorException;
import com.util.exceptions.ModelException;
import com.util.sql.NonTransactionalPlainAction;



public class ListadoPeticionesAction implements NonTransactionalPlainAction {
	
	private static Log log = LogFactory.getLog(TodasCancionesAction.class);
	
	public ListadoPeticionesAction() {}

	public Object execute(Connection connection) throws ModelException, InternalErrorException {
		try{
			DJDAO dao = new DJDAO();
			return dao.findPeticiones(connection);
									
		}catch (Exception e){
			throw new InternalErrorException(e);
		}
	}
	

	    

}
